1. Field of the Invention
The present invention relates to a device and a method for controlling packet flow, and more particularly to a device and a method for controlling packet transmission from a station when a packet memory of a device such as a switch or a router is in a state of physical saturation.
2. Description of the Related Art
In the data transmission between two stations, the packet memory of a switch can be classified according to whether it is an internal memory or an external memory. In a conventional switch system, external memory is seldom used because of associated high cost, thus internal memory is generally used. In case internal memory is used, a proper physical size for the internal memory must be chosen, while considering the physical dimension limitations of the chip.
In the field of network management, it is very important to prevent the physical saturation of the packet memory. Thus, a standard prescribes control over the packet flow between two stations. However, the standard defines only the flow control packet itself, and does not prescribe the condition for the control of packet flow so as to avoid saturation. For this reason, a network manager is utilized to set the condition.
There are two forms of conventional packet flow control methods. One is to control the packet flow by investigating the state of packet memory (hereinafter, referred to as “state method”) and the other is to control the packet flow by investigating bandwidth (hereinafter, referred to as “bandwidth method”).
In the state method, a hypothetical condition is set by determining the amount of packet memory consumed prior to the state of physical saturation. When the condition is satisfied, a pause packet in a full-duplex communication or a back pressure in a half-duplex communication is transmitted to prevent additional packets at the transmission station from being transmitted. Accordingly, the time to empty the packet memory can be obtained using this method.
In the bandwidth method, the network manager sets the bandwidth of the packet that is transmitted/received by a certain port to a certain value. Then, the packet transmission is controlled for the station that exceeds the allowed bandwidth.
The conventional approaches only check the remaining amount of the packet memory or the limited bandwidth of the packet to perform the packet flow control. Therefore, these conventional methods may not be effective for individual service in modern networks where various types of services coexist.
Furthermore, since the packet flow control is performed only for a source port, wherein the physical saturation of the packet memory occurs, or for all ports, the conventional methods have a disadvantage that the port requiring the packet flow control cannot be selected and controlled properly. In addition, although priority data are included in a VLAN (Virtual Local Area Network) packet or IP (Internet Protocol) packet, it is not used to control the packet flow, but only used to write the packet on the packet memory.